import React from 'react';
import { Input as AntInput } from 'antd';
import type { InputProps as AntInputProps } from 'antd/es/input';

export interface InputProps extends AntInputProps {
  componentId?: string;
  label?: string;
  placeholder?: string;
}

const Input: React.FC<InputProps> = ({
  componentId,
  label,
  placeholder = '请输入',
  ...props
}) => {
  return (
    <div className="yong-input-wrapper">
      {label && <div className="yong-input-label">{label}</div>}
      <AntInput 
        placeholder={placeholder} 
        {...props} 
        data-component-id={componentId}
      />
    </div>
  );
};

export default Input; 